<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <title>Site Manager</title>
        <link rel="stylesheet" type="text/css" href="<?= base_url(); ?>css/admin/reset.css" media="screen" />
        <link rel="stylesheet" type="text/css" href="<?= base_url(); ?>css/admin/text.css" media="screen" />
        <link rel="stylesheet" type="text/css" href="<?= base_url(); ?>css/admin/grid.css" media="screen" />
        <link rel="stylesheet" type="text/css" href="<?= base_url(); ?>css/admin/layout.css" media="screen" />
        <link rel="stylesheet" type="text/css" href="<?= base_url(); ?>css/admin/nav.css" media="screen" />
        <link rel="stylesheet" type="text/css" href="<?= base_url(); ?>css/admin/custom.css" media="screen" />
        <!--[if IE 6]><link rel="stylesheet" type="text/css" href="../css/ie6.css" media="screen" /><![endif]-->
        <!--[if IE 7]><link rel="stylesheet" type="text/css" href="../css/ie.css" media="screen" /><![endif]-->


    </head>
    <body >
        <div class="container_16" >

            <?php include 'admin_header.php'; ?>

            <!-- Left Menu Panel !-->

            <?php include 'admin_left_menu.php'; ?>


            <!-- Content Panel -->	
            <div class="grid_7">
                <div class="box">
                    <h2>
                        <a href="#" id="toggle-tables">CMS MANAGEMENT : <?= $cmsrow->title; ?></a>
                    </h2>
                    <div class="block" >
                        <form name="admin-form" action="<?= base_url(); ?>admin/cms/update_cms" method="post">
                            <fieldset>
                                <legend>UPDATE : <?= strtoupper($cmsrow->title); ?> </legend>
                                <?php
                                if ($this->session->flashdata('message')) {
                                    $msg = $this->session->flashdata('message');
                                    echo '<font color="red">' . $msg . '</font>';
                                }
                                ?> 
                                <div class="field">
                                    <label> Meta Title</label>
                                    <textarea rows="2" cols="105" name="metatitle" ><?= $cmsrow->meta_title; ?> </textarea>
                                </div>
                                <div class="field">
                                    <label> Meta Keyword</label>
                                    <textarea rows="2" cols="105" name="metakeyword"  ><?= $cmsrow->meta_keyword; ?></textarea>
                                </div>
                                <div class="field">
                                    <label> Meta Description</label>
                                    <textarea rows="3" cols="105" name="metadescription"  ><?= $cmsrow->meta_description; ?></textarea>
                                </div>
                                <div class="field">
                                    <label> Description</label>
                                    <?php
                                    include_once APPPATH . '../ckeditor/ckeditor.php';
                                    $ckeditor = new CKEditor();
                                    $ckeditor->basePath = base_url() . '/ckeditor/';
                                    $ckeditor->config['filebrowserBrowseUrl'] = base_url() . '/ckfinder/ckfinder.html';
                                    $ckeditor->config['filebrowserImageBrowseUrl'] = base_url() . '/ckfinder/ckfinder.html?type=Images';
                                    $ckeditor->config['filebrowserFlashBrowseUrl'] = base_url() . '/ckfinder/ckfinder.html?type=Flash';
                                    $ckeditor->config['filebrowserUploadUrl'] = base_url() . '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files';
                                    $ckeditor->config['filebrowserImageUploadUrl'] = base_url() . '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images';
                                    $ckeditor->config['filebrowserFlashUploadUrl'] = base_url() . '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash';
                                    $ckeditor->editor('cmsdescription', $cmsrow->description);
                                    ?>         
                                </div>
                                <input type="hidden" name="cmsid" value="<?= $cmsrow->id; ?>"/>
                                <input type="submit" value="Update <?= ucfirst($cmsrow->title); ?>" name="update_cms" />
                            </fieldset>
                        </form>
                    </div>
                </div> <!-- END OF BOX -->
            </div>
            <div class="grid_16" id="site_info">
                <div class="box">
                    <p><?= $this->settings_model->get_setting('webtitle'); ?></p>
                </div>
            </div>
            <div class="clear"></div>
        </div>
        <script type="text/javascript" src="<?= base_url(); ?>js/admin/mootools-1.2.1-core.js"></script>
        <script type="text/javascript" src="<?= base_url(); ?>js/admin/mootools-1.2-more.js"></script>
        <script type="text/javascript" src="<?= base_url(); ?>js/admin/mootools-fluid16-autoselect.js"></script>
    </body>
</html>